<!--
 * @Author: wangming
 * @Date: 2021-04-21 10:40:46
 * @LastEditors: wangming
 * @LastEditTime: 2022-04-29 11:06:15
 * @Description: file content
-->
<template>
  <el-select clearable :value="value" @change="changes">
    <el-option
      v-for="(item, index) in listData"
      :key="index"
      :label="item.label"
      :value="item.value"
    />
  </el-select>
</template>
<script>
import { DEPT_CODE } from "@/utils/enum.js";
export default {
  props: ["value", "tagName"],
  computed: {
    listData() {
      if (this.tagName === "hlLayoutForm") {
        return [
          {
            label: "当前用户所在部门",
            value: "_D1_",
          },
        ];
      } else {
        return DEPT_CODE;
      }
    },
  },

  methods: {
    async changes(id) {
      this.$emit("input", id);
    },
  },
};
</script>

<style lang="scss" scoped></style>
